Function: nearestHeadingLevel(domElement, context) Shorthand: nearestHL(domElement, context) Description: Returns the number of the closest heading level in the reading order relative to the specified element. Returns: Number. Note: If context is not specified, window.document will be used instead. If there are no headings prior to the specified element in the reading order, 0 will be returned. Both native H1 through H6 headings and ARIA headings are recognized equally. Example: // Return the number of the heading prior to the specified element in the reading order. var priorHeadingLevel = $A.nearestHeadingLevel(domElement);